﻿using WuDada.Core.Helper;
using log4net.Config;
using Spring.Context;
using WuDada.Trade.DataLoader.Service;

namespace WuDada.Core.SystemApplications
{
    public class TradeDataLoaderFactory
    {
        public TradeDataLoaderFactory()
        {
            XmlConfigurator.Configure();
        }
        public TradeDataLoaderFactory(IApplicationContext applicationContext)
        {
            SpringHelper.ApplicationContext = applicationContext;
            XmlConfigurator.Configure();
        }

        public IDataLoadService GetDataLoadService()
        {
            return SpringHelper.ApplicationContext["DataLoadServiceProxy"] as IDataLoadService;
        }
    }
}
